package com.dengpp.pdform.model;

import java.io.Serializable;

public class LocationInfo implements Serializable {
    private double latitude;
    private double longitude;
    private String address;
    private long timestamp;
    // 必须有无参构造函数
    public LocationInfo() {}
    public LocationInfo(double latitude, double longitude) {
        this.latitude = latitude;
        this.longitude = longitude;
        this.timestamp = System.currentTimeMillis();
    }

    // Getters and Setters
    public double getLatitude() { return latitude; }
    public double getLongitude() { return longitude; }
    public String getAddress() { return address; }
    public LocationInfo setAddress(String address) { this.address = address; return this; }
    public long getTimestamp() { return timestamp; }

    @Override
    public String toString() {
        return String.format("纬度: %.6f, 经度: %.6f", latitude, longitude);
    }
}
